/*
 * oled_spi_ssd1306.h
 *
 *  Created on: 2016��12��29��
 *      Author: gavin
 */

#ifndef SRC_OLED_SPI_SH1106_H_
#define SRC_OLED_SPI_SH1106_H_


/*
 *
 */
#define OLED_VER 1

typedef unsigned char u8;
typedef unsigned int u32;
typedef unsigned int u16;


void write_cmd(u8 data);
/*
 *
 */
void oled_por();
void oled_init();
void oled_clear(void);
void oled_showstring(u8 x,u8 y,char *p,u8 mode);
void oled_refresh_gram(void);
void oled_shownum(u8 x,u8 y,u32 num,u8 len,u8 size,u8 mode);
void oledDisplayOn(void);
void oledDisplayOff(void);
void oledDrawRectangle(u8 x0, u8 y0, u8 x1, u8 y1, u8 t);

#endif /* SRC_OLED_SPI_SSD1306_H_ */
